package modellayer;

/**
 * The Appointment class to create Appointment objects
 * @author Allan Eriksen, Andreas Rye, Casper Madsen, Christian Stidsborg, Stefan Bols
 */

public class Appointment
{
	private int appointmentId;
	private String subject;
	private long fromDate;
	private long toDate;
	private String address;
	private ZipCode zipCode;
	private long addedDate;
	private KeyPerson kp;
	private boolean isDummy;
	
	/**
	 * Appointment Fields
	 * @param appontmentId
	 * @param subject
	 * @param fromDate
	 * @param toDate
	 * @param address
	 * @param zipCode
	 * @param addedDate
	 * @param kp
	 * @param isDummy
	 */
	
	/**
	 * Constructor for the Appointment class 
	 */
	public Appointment(int appointmmentId, String subject, long fromDate, long toDate, String address, ZipCode zipCode, long addedDate, KeyPerson kp)
	{
		this.appointmentId = appointmmentId;
		this.subject = subject;
		this.fromDate = fromDate;
		this.toDate = toDate;
		this.address = address;
		this.zipCode = zipCode;
		this.addedDate = addedDate;
		this.kp = kp;
		this.isDummy = false;
	}
	
	/**
	 * Appointment dummy for the Database layer
	 * @param appointmentId
	 */
	public Appointment(int appointmentId)
	{
		this.appointmentId = appointmentId;
		this.isDummy = true;
	}
	
	/**
	 * Get method for the isDummy 
	 * @return isDummy
	 */
	public boolean getIsDummy()
	{
		return this.isDummy;
	}
	
	/**
	 * Set method for the KeyPerson 
	 * @param kp
	 */
	public void setKeyPerson(KeyPerson kp)
	{
		this.kp = kp;
	}
	
	/**
	 * Get method for the KeyPerson 
	 * @return kp
	 */
	public KeyPerson getKeyPerson()
	{
		return kp;
	}

	/**
	 * Get method for the appointmentId 
	 * @return appointmentId
	 */
	public int getAppointmmentId()
	{
		return appointmentId;
	}

	/**
	 * Set method for the appointmentId 
	 * @param appointmentId
	 */
	public void setAppointmmentId(int appointmmentId)
	{
		this.appointmentId = appointmmentId;
	}

	/**
	 * Get method for the subject 
	 * @return subject
	 */
	public String getSubject()
	{
		return subject;
	}

	/**
	 * Set method for the subject 
	 * @param subject
	 */
	public void setSubject(String subject)
	{
		this.subject = subject;
	}

	/**
	 * @return the fromDate
	 */
	public long getFromDate() {
		return fromDate;
	}

	/**
	 * @param fromDate the fromDate to set
	 */
	public void setFromDate(long fromDate) {
		this.fromDate = fromDate;
	}

	/**
	 * @return the toDate
	 */
	public long getToDate() {
		return toDate;
	}

	/**
	 * @param toDate the toDate to set
	 */
	public void setToDate(long toDate) {
		this.toDate = toDate;
	}

	/**
	 * Get method for the address 
	 * @return address
	 */
	public String getAddress()
	{
		return address;
	}

	/**
	 * Set method for the address 
	 * @param address
	 */
	public void setAddress(String address)
	{
		this.address = address;
	}

	/**
	 * Get method for the intZipCode, returns an object from the ZipCode class
	 * @return zipCode
	 */
	public int getIntZipCode()
	{
		return zipCode.getZipCode();
	}
	
	/**
	 * Get method for the zipCode 
	 * @return zipCode
	 */
	public ZipCode getZipCode()
	{
		return zipCode;
	}

	/**
	 * Set method for the zipCode 
	 * @param zipCode
	 */
	public void setZipCode(ZipCode zipCode)
	{
		this.zipCode = zipCode;
	}

	/**
	 * Get method for the addedDate 
	 * @return addedDate
	 */
	public long getAddedDate()
	{
		return addedDate;
	}

	/**
	 * Set method for the addedDate 
	 * @param addedDate
	 */
	public void setAddedDate(long addedDate)
	{
		this.addedDate = addedDate;
	}
}
